<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>易买网 - 首页</title>
<link type="text/css" rel="stylesheet"
	href="<%=path%>/resources/css/style.css" />
<script type="text/javascript"
	src="<%=path%>/resources/scripts/function.js"></script>
</head>
<body>
	<div id="header" class="wrap">
		<div id="logo">
			<img src="<%=path%>/resources/images/logo.gif" />
		</div>
		<div class="help">
			<a href="<%=path%>/main/shop" class="shopping">购物车</a><a
				href="<%=path%>/login">登录</a><a href="<%=path%>/main/register">注册</a><a
				href="<%=path%>/main/cancel">注销</a>
		</div>
		<div class="navbar">
			<ul class="clearfix">
				<li class="current"><a href="<%=path%>/main/index">首页</a></li>
				<c:forEach var="indexCat" items="${categoriesIndex }">
					<li><a href="<%=path%>/main/${indexCat.id }/product">${indexCat.name }</a></li>
				</c:forEach>
			</ul>
		</div>
	</div>
	<div id="childNav">
		<div class="wrap">
		<ul class="clearfix">
		   <c:forEach var="seCat" items="${categoriesSeconde }">
		   <li><a href="<%=path%>/main/${seCat.id }/product">${seCat.name }</a></li>
		   </c:forEach>
		</ul>
		</div>
	</div>
	<div id="position" class="wrap">
		您现在的位置：<a href="index.html">易买网</a> &gt; <a href="product-list.html">图书音像</a>
		&gt; 图书
	</div>
	<div id="main" class="wrap">
		<div class="lefter">
			<div class="box">
				<h2>商品分类</h2>
				<dl>
					<c:forEach var="navMap" items="${navigationMap }">
						<dt>${navMap.key }</dt>
						<c:set value="${navMap.value }" var="subItem" />
						<c:forEach items="${subItem }" var="var">
							<dd>
								<a href="<%=path%>/main/${var.id }/product"> ${var.name }</a>
							</dd>
						</c:forEach>
					</c:forEach>

				</dl>
			</div>
			<div class="spacer"></div>
			<div class="last-view">
				<h2>最近浏览</h2>
				<dl class="clearfix">
					<dt>
						<img src="<%=path%>/resources/images/product/0_tiny.gif" />
					</dt>
					<dd>
						<a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a>
					</dd>
					<dt>
						<img src="<%=path%>/resources/images/product/0_tiny.gif" />
					</dt>
					<dd>
						<a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a>
					</dd>
				</dl>
				<script type="text/javascript">
					document.write("Cookie中记录的购物车商品ID：" + getCookie("product")
							+ "，可以在动态页面中进行读取");
				</script>
			</div>
		</div>
		<div class="main">
			<div class="product-list">
				<h2>全部商品</h2>
				<div class="pager">
					<ul class="clearfix">
						<li><a href="#">上一页</a></li>
						<li class="current">1</li>
						<li><a href="#">2</a></li>
						<li><a href="#">3</a></li>
						<li><a href="#">4</a></li>
						<li><a href="#">5</a></li>
						<li><a href="#">下一页</a></li>
					</ul>
				</div>
				<div class="clear"></div>
				<ul class="product clearfix">
					<c:forEach var="pr" items="${products }">
						<li>
							<dl>
								<dt>
									<a href="<%=path%>/main/product/${pr.epId }/show"
										target="_blank"><img
										src="<%=path%>/resources/images/product/${pr.fileName }" /></a>
								</dt>
								<dd class="title">
									<a href="<%=path%>/main/product/${pr.epId }/show"
										target="_blank">${pr.description }</a>
								</dd>
								<dd class="price">${pr.price }</dd>
							</dl>
						</li>
					</c:forEach>
				</ul>
				<div class="clear"></div>
				<div class="pager">
					<ul class="clearfix">
						<li><a href="#">上一页</a></li>
						<li class="current">1</li>
						<li><a href="#">2</a></li>
						<li><a href="#">3</a></li>
						<li><a href="#">4</a></li>
						<li><a href="#">5</a></li>
						<li><a href="#">下一页</a></li>
					</ul>
				</div>
			</div>
		</div>
		<div class="clear"></div>
	</div>
	<div id="footer">Copyright &copy; 2017 爱苗科技 All Rights Reserved.
		皖ICP证000001号</div>
</body>
</html>